#include "StimTargetPost.h"

CStimTargetPost::CStimTargetPost(void)
:CStimTarget(Stims::Target)
{
}

CStimTargetPost::~CStimTargetPost(void)
{
}

void CStimTargetPost::Reset()
{
    // first call base
    CStimTarget::Reset();

    // init target post
    glNewList(_uDisplay,GL_COMPILE);
    glEnable(GL_DEPTH_TEST);

    glMatrixMode(GL_MODELVIEW);
    glPushMatrix();
    glTranslated(_vPostPosition[0],_vPostPosition[1],_vPostPosition[2]);
    glTranslated(0,-_dEyeHeight,0);
    glRotated(-90,1,0,0);
    glColor3dv(&_vPostColor[0]);
    GLUquadricObj* q = gluNewQuadric ();
    gluQuadricNormals(q, GLU_SMOOTH);			// Create Smooth Normals (NEW)
    gluQuadricTexture(q, GL_TRUE);
    gluCylinder (q, _dPostRadius , _dPostRadius , _dPostHeight, 32, 32);
    gluDeleteQuadric (q);
    glPopMatrix();

    glDisable(GL_DEPTH_TEST);
    glEndList();
}

std::string CStimTargetPost::GetName()
{
    return std::string("Target Post, position fixed");
}

